<#include "common/main.html">
<#macro bodyId>statistics-agent</#macro>
<#macro content>


<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main ty-common-page">
    <h1 class="page-header">红包报表
        <div class="btns">
        </div>
    </h1>
    <div class="tool-bar">
        <div class="filter">
            <form action="" method="get" class="J_filterForm" id="statistics-form">
                <div class="form-group">

                    <span class="label-text">姓&nbsp;&nbsp;&nbsp;&nbsp;名：&nbsp;&nbsp;&nbsp;</span>
                    <div class="col7">
                        <input class="form-control" name="name"  value="${queryDto.name}" />
                    </div>
                    &nbsp;&nbsp;&nbsp;
                    <span class="label-text">注册手机号：</span>
                    <div class="col7">
                        <input class="form-control" name="phoneNumber" value="${queryDto.phoneNumber}" />
                    </div>
                    &nbsp;&nbsp;&nbsp;
                    <span class="label-text">用户类型：</span>
                    <div class="col7">
                        <select class="form-control" name="type" >
                            <option value="">请选择</option>
                            <option value="1" <#if queryDto.type=='1'>selected="true"</#if>>注册用户</option>
                            <option value="2" <#if queryDto.type=='2'>selected="true"</#if>>渠道经理</option>
                        </select>
                    </div>
                    <div></div>
                    <br/>

                    <span class="label-text">开始时间：</span>
                    <div class="col6">
                        <input class="form-control J_startDate" name="startTimeStr" value="${queryDto.startTimeStr}" >
                    </div>
                    &nbsp;&nbsp;&nbsp;
                    <span class="label-text">结束时间：&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <div class="col6">
                        <input class="form-control J_endDate" name="endTimeStr" value="${queryDto.endTimeStr}" >
                    </div>

                    <button type="submit" class="btn btn-success J_getExcel"
                            data-action="${rc.contextPath}/awardStatistics/export">红包明细Excel
                    </button>
                    <button type="submit" class="btn btn-success J_search"
                            data-action="${rc.contextPath}/awardStatistics/list">查询
                    </button>

                </div>

        </form>
    </div>
</div>
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>用户ID</th>
                <th>姓名</th>
                <th>注册手机号</th>
                <th>用户类型</th>
                <th>推荐人姓名</th>
                <th>推荐人手机号</th>
                <th>开启红包个数</th>
                <th>领取红包个数</th>
                <th>领取红包金额</th>
                <th>提现金额</th>
            </tr>
            </thead>
            <tbody>
            <#if list??>
            <#list list as award>
            <tr>
                <td>${award.accountId}</td>
                <td>${award.name}</td>
                <td>${award.phoneNumber}</td>
                <td>
                    <#if award.type=='1'>注册用户</#if>
                    <#if award.type=='2'>渠道经理</#if>
                </td>
                <td>${award.parentAccountName}</td>
                <td>${award.parentPhoneNumber}</td>
                <td>
                    <#if award.openAwardCount==null>0
                    <#else>
                    ${award.openAwardCount}
                    </#if>
                </td>
                <td>
                    <#if award.getAwardCount==null>0
                    <#else>
                    ${award.getAwardCount}
                    </#if>
                </td>
                <td>
                    <#if award.getAwardFee==null>0
                    <#else>
                    ${award.getAwardFee/100}
                </#if>
                </td>
                <td>
                    <#if award.awardOutFee==null>0
                    <#else>
                    ${award.awardOutFee/100}
                </#if>
                </td>
            </tr>
            </#list>
            </#if>
            </tbody>
        </table>
    </div>
    <#include "common/page.html">
</div>

<script>
    var config = {}
</script>

</#macro>

<script>

</script>